On a computer system, a resource is typically specified using a file name with a path (or directory) or a Universal Resource Locator (URL). HyperText Markup Language (HTML) documents use URL addresses to specify the locations of the resources that are required by these documents or linked to these documents through hyperlinks.
A complete URL address includes the network protocol for accessing the resource, the host address of the computer on which the resource resides, the directory in which the resource resides, and the file name of the resource. For example, URL address http://www.uspto.gov/main/patents.htm specifies that HTML document patents.htm is retrievable using Hypertext Transfer Protocol (HTTP) from directory /main of host www.uspto.gov. To retrieve patents.htm, a client computer contacts host www.uspto.gov using HTTP protocol to transfer file /main/patents.html from the HTTP server at www.uspto.gov. After receiving a request from the client for an HTML document, the HTTP server at the remote host (e.g., www.uspto.gov) typically maps the directory (e.g., /main) in the URL to a directory in the file system of the server computer to locate the corresponding HTML document specified in the URL address.
Relative URL addresses are typically used in an HTML document for specifying the locations of the resources relative to the location of the HTML document. For example, HTML document at http://www.uspto.gov/main/patents.htm may contain a hyperlink to relative URL address ./search.htm. From the base address of HTML document patents.htm, it can be determined that the complete address of document search.htm is http://www.uspto.gov/main/search.htm.
URL addresses can also be used to specify resources which reside locally on a computer system. For example, URL address file:///C:/main/patents.htm specifies an HTML document on a local hard drive C. A file on a computer is typically specified as a file name with a path. For example, file name C:/main/patents.htm contains path C:/main/. A file name with a path can also be considered as a relative URL address with a default base address (e.g., file:///)
URL addresses specify the exact locations of the corresponding resources so that a web browser can retrieve the resources from the locations as specified in the URL addresses. When the storage locations of the resources are moved (e.g., from a remote server to a local file system), the corresponding URL addresses for accessing these resources are changed accordingly in order to access the resources from the new locations. When relative URL addresses are used, only the base addresses are changed accordingly. The complete addresses for the relative URL addresses are changed automatically to reflect the changes in the base addresses, since the complete addresses for the relative URL addresses are computed from the base addresses and the relative URL addresses.
A web browser typically maintains a cache that stores some of the files retrieved from remote servers through a network connection. Such a web browser may use the resource stored in the cache to display a document when it assumes or determines that the resource on the remote server has not changed since the resource was downloaded and cached. For example, when the forward (or back) button on a web browser is pressed, the previous downloaded and cached version of the resource is used, assuming that there has been no change in the resource. When no network connection to the server is available, a web browser typically displays an error message, even when a version of the resource is previously downloaded and cached. A user may manually switch the web browser (e.g., Internet Explorer) from an online mode to an offline mode (e.g., work offline). When the web browser is in an offline mode, it can display, without a network connection, the web pages that have already been down loaded in the cache. If the user clicks on a link for a document that is not in the cache when the web browser is in the offline mode, the web browser informs the user that the document is not available in the offline mode; and the user has the option to keep the web browser in the offline mode or switch the web browser back to the online mode.